package cn.fscode.code.generator;

import cn.fscode.code.generator.service.MigrationDataService;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author shenguangyang
 */
@Component
public class CodeGenRunner implements ApplicationRunner {
    @Resource
    private MigrationDataService migrationDataService;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        migrationDataService.migration();
    }
}
